#ifndef _vfx_SFX_H_
#define _vfx_SFX_H_

namespace part2d
{
	class Part2D;
}
#include "math/vec2.h"
#include <string>
#include <vector>

namespace vfx
{
class EffectMan;

class	SFXSet
{
public:
	SFXSet( EffectMan*					pParent) 
			: m_pParent(pParent) {};
	virtual						~SFXSet() {};
	virtual	void				Render(const math::Vec2& Offset, float Scale) = 0;
	virtual void				Tick(float dt)	= 0;
	EffectMan*					GetParent() const { return m_pParent; };
protected:
	EffectMan*					m_pParent;
	
};

class	Part2DSFXSet : public SFXSet
{
public:
	Part2DSFXSet(EffectMan*		pParent);
	virtual						~Part2DSFXSet();
	virtual	void				Render(const math::Vec2& Offset, float Scale);
	virtual void				Tick(float dt);
	virtual void				Load(const std::string& File);
	virtual void				TriggerParticles( int Count, const math::Vec2& Pos, const math::Vec2& Size);
	virtual void				TriggerParticles( int Count, const math::Vec2& Pos);
protected:
	part2d::Part2D*				m_pSys;
};

class Basevfx;
class EffectMan
{
public:
	EffectMan();
	virtual						~EffectMan();

	virtual void				Tick(float dt);
	virtual void				Render(const math::Vec2& Offset, float Scale = 1.0f);
	virtual void				RenderBackground() {};
	virtual void				RenderForeground() {};
	virtual void				Init() {};
	virtual void				AddScore(int Score) {} ;
	const math::Vec2&			GetOffset() const { return m_Offset; };
	float						GetScale() const { return m_Scale; };
protected:
	void						AddSet(SFXSet* pSet) { m_Set.push_back(pSet); };
	void						DropSet(SFXSet* pSet, bool Delete);
	std::vector<SFXSet*>		m_Set;
	math::Vec2					m_Offset;
	float						m_Scale;
};

}	//namespace vfx

#endif // _vfx_SFX_H_